<template>
  <div>
    <i class="el-icon-full-screen" @click="roggleFull"></i>
  </div>
</template>

<script>
import screenfull from "screenfull";
export default {
  methods: {
    roggleFull() {
      // 判断 浏览器是否支持全屏
      if (!screenfull.isEnabled) {
        // 不支持则警告提示
        this.$message({
          type: "warning",
          message: "该浏览器不支持全屏!",
        });
        return;
      }
      screenfull.toggle();
    },
  },
};
</script>

<style lang="scss" scoped></style>
